import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class test {

    static class DataVO {
        private String member_sn;
        private String action_member_sn;

        public DataVO(String member_sn, String action_member_sn) {
            this.member_sn = member_sn;
            this.action_member_sn = action_member_sn;
        }

        public String getMember_sn() {
            return member_sn;
        }

        public String getAction_member_sn() {
            return action_member_sn;
        }
    }


    static class Employee {
        private String name;
        private String work;
        private Integer age;
        public Employee (String name,String work,Integer age) {
            this.name = name;
            this.work=work;
            this.age=age;
        }

        public String getName() {
            return name;
        }

        public String getWork() {
            return work;
        }

        public Integer getAge() {
            return age;
        }
    }

    public static void main(String[] args) {
        // 创建一个示例数据集合
        List<DataVO> rows = new ArrayList<>();
        rows.add(new DataVO("member1", "action_member1"));
        rows.add(new DataVO("member2", "action_member2"));
        rows.add(new DataVO("member3", "action_member1"));
        rows.add(new DataVO("member4", "action_member3"));
        rows.add(new DataVO("member3", "action_member2"));

        // 获取 member_sn 集合
//        List<String> member_sn_list = rows.stream().map(vo -> Stream.of(vo.getAction_member_sn(), vo.getMember_sn())
//                       // .collect(Collectors.toList()))
////                .flatMap(Collection::stream)
////                .distinct()
//                .collect(Collectors.toList());

//        List<Stream<String>> member_sn_list = rows.stream().map(vo -> Stream.of(vo.getAction_member_sn(), vo.getMember_sn()))
//                .collect(Collectors.toList()).stream().collect(Collectors.toList());
//
//        // 打印结果
//        System.out.println(member_sn_list);

        List<Employee> employees = Arrays.asList(
                new Employee("a", "b", 1),
                new Employee("aa", "bb", 2),
                new Employee("aaa", "bbb", 3)
                );

        Map<String, Integer> collect = employees.stream().collect(Collectors.toMap(Employee::getName, Employee::getAge));
//        System.out.println(collect);




    }
}
